import routes from './routes'
import { BrowserRouter, Routes, Route } from 'react-router-dom'
const Router = () => {
	return (
		<BrowserRouter>
			<Routes>
				{
					routes.length > 0 && routes.map((v, i) => {
						return <Route key={i} path={v.path} element={<v.element></v.element>}>
							{
								v.children && v.children.map((v, i) => {
									return <Route key={i} path={v.path} element={<v.element></v.element>}></Route>
								})
							}
						</Route>
					})
				}
			</Routes>
		</BrowserRouter>
	)
}


export default Router